package com.example.forum.controller;

import com.example.forum.dto.ArticleScoreDTO;
import com.example.forum.services.IArticleHotServiceImpl;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "热点接口")
@Slf4j
@RestController
@RequestMapping("/article")
public class ArticleHotController {

    @Resource
    private IArticleHotServiceImpl articleHotService;

    @Resource
    private ArticleScoreDTO articleScoreDTO;

    @GetMapping("/hotList")
    public List<ArticleScoreDTO> getHotArticle() {
        return articleHotService.selectTop();
    }
}
